All Functions Used So Far, Week 4

group_tt

{tinytable}

Grouping in tinytable

factor

{base}

Create a factor

arrange

{dplyr}

Sort values of data frame according to a variable/combination of variables

seq

{base}

Create a sequence

dnorm

{stats}

Density distribution for the normal distribution

nrow

{base}

Get number of rows of a data frame

read.csv

{utils}

Read a csv file to data frame. Specify stringsAsFactors = FALSE to keep all string columns as characters

median

{stats}

Get median of a vector

cut

{base}

Convert Numeric to Factor

ordered

{dplyr}

Create an ordered factor

binomial

{base}

Family argument in glm()

summary

{base}

Obtain summary statistics or detailed regression output

sim_slopes

{interactions}

Perform simple slopes analysis for interaction effects.

group_by

{dplyr}

Group tibble/data.frame by a factor variable. All further tidyverse operations are performed group-wise

names

{base}

Get or set names of an object

View

{base}

View a data frame

sd

{stats}

Get standard deviation of a vector

ls

{base}

Return a vector of character strings giving the names of the objects in the specified environment

c

{base}

Combine values/vectors into a vector

install.packages

{utils}

Install R packages

mutate

{dplyr}

Create new variables

data.frame

{base}

Create a data.frame from vectors

glm

{base}

Fits generalized linear models

save_tt

{tinytable}

Save a tinytable object to a file

read_excel

{readxl}

Read an Excel file

list

{base}

Create a list object

var

{stats}

Calculate variance

setwd

{base}

Set Working Directory

length

{base}

Returns number of elements in an object

expression

{base}

Used in plots to add symbols to axes

nobs

{stats}

Return the number of observations in a model object

order

{base}

Get indexes that will sort a vector

filter

{dplyr}

Filter out rows of a data frame according to logical vector

lm

{stats}

Fit linear models using least squares

t.test

{stats}

Performs one and two sample t-tests on vectors of data.

complete.cases

{stats}

Find Complete Cases

max

{base}

Get maximum of a vector

mean

{base}

Get mean of a vector

ungroup

{dplyr}

Resolve grouping created with “group_by”

rm

{base}

Remove objects

predict

{stats}

Generate predicted values from model objects

is.na

{base}

Check if a value is NA/elements of vector are NA

scale_color_manual

{ggplot2}

Manually sets the colours used in a ggplot color scale to user-specified values

modelsummary

{modelsummary}

Creates regression and data tables

log

{base}

log (default base = e)

range

{base}

Return range of values

colMeans

{base}

Computes the means of each column of a numeric matrix or data frame

quantile

{stats}

Obtain empirical quantiles of a vector

ifelse

{base}

Return a or b depending on the value of test

head

{utils}

Show first 5 rows of a data frame

tibble

{tibble}

A modern data frame from the tidyverse

factor

{base}

Create factor variables

str

{utils}

Get the structure of an R object

library

{base}

Load an R package

min

{base}

Get minimum of a vector

The end!